Only register rocm_aiter_ops if aiter is found#28428
Merged
tjtanaa merged 3 commits intovllm-project:mainfrom Nov 11, 2025
Merged
Only register rocm_aiter_ops if aiter is found#28428tjtanaa merged 3 commits intovllm-project:mainfrom
tjtanaa merged 3 commits intovllm-project:mainfrom
Conversation
Signed-off-by: mgoin <mgoin64@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an issue where importing rocm_aiter_ops at the module level in fp8_utils.py caused unnecessary warnings on non-ROCm platforms. By moving the import into the _run_aiter method, it becomes a lazy import, ensuring that ROCm-specific code is only loaded when it is actually used. This change is clean, effective, and has no significant performance impact. The fix is well-implemented and resolves the reported problem.
Merged
5 tasks
yewentao256
approved these changes
Nov 10, 2025
Member
yewentao256
left a comment
There was a problem hiding this comment.
LGTM, thanks for the work!
tjtanaa
approved these changes
Nov 10, 2025
Collaborator
tjtanaa
left a comment
There was a problem hiding this comment.
LGTM. Thank you for the fix.
khluu
pushed a commit
that referenced
this pull request
Nov 16, 2025
Signed-off-by: mgoin <mgoin64@gmail.com> (cherry picked from commit f2d9ad0)
khluu
pushed a commit
that referenced
this pull request
Nov 16, 2025
Signed-off-by: mgoin <mgoin64@gmail.com> (cherry picked from commit f2d9ad0)
devpatelio
pushed a commit
to SumanthRH/vllm
that referenced
this pull request
Nov 29, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
In #24490 there was an addition of a new import for rocm.py
Without this change, you can see the rocm import warnings on nvidia devices by default
Thanks to @tjtanaa, he pointed out there was an oversight and the ops class should act as a no-op when it is on non-ROCm platform and aiter is not installed.
I found the culprit using
Output:
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.